import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import lombok.val;
import org.joda.time.LocalDateTime;
import org.junit.Test;

import java.time.temporal.TemporalAccessor;
import java.util.Date;

public class TEST {
    LocalDateTime localDateTime = new LocalDateTime(new Date());
    @Test
    public void test(){
        Date date = new Date();
        int thisDayOfWeek = DateUtil.thisDayOfWeek();
        int dayOfWeek = DateUtil.dayOfWeek(date);
        System.out.println(dayOfWeek);
        DateTime dateTime = DateUtil.beginOfWeek(new Date());
        System.out.println(dateTime);
//        int hours = date.getHours();
//        int minutes = date.getMinutes();
//        int seconds = date.getSeconds();
//        long milliseconds = date.getTime() % 1000;
//
//        System.out.println("Hours: " + hours);
//        System.out.println("Minutes: " + minutes);
//        System.out.println("Seconds: " + seconds);
//        System.out.println("Milliseconds: " + milliseconds);

    //    System.out.println(DateUtil.beginOfDay(date));
    }

    public static void main(String[] args) {
        //16位
        String key = "MIGfMA0GCSqGSIb3";

        //字符串
        String str = "huanzi.qch@qq.com:欢子";
        try {
            //加密
            String encrypt = AesUtil.encrypt(str, key);
            //解密
            String decrypt = AesUtil.decrypt(encrypt, key);

            System.out.println("加密前：" + str);
            System.out.println("加密后：" + encrypt);
            System.out.println("解密后：" + decrypt);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}


